<template>
<div>
  <table border="1" cellspacing="0" align="center">
    <tr>
      <td>文章</td>
    </tr>
    <tr v-for="i in from">
      <td @click="tiao(i.text,i.id)">{{i.title}}</td>
    </tr>
  </table>
</div>
</template>

<script>
export default {
  name: "comments",
  data(){
    return{
      from:{}
    }
  },
  methods:{
    get_biaoti(){
      this.$axios.get('users/wenzhang').then(res=>{
        this.from = res.data.list
      })
    },
    tiao(text,id){
      this.$router.push({path:'/xiangqing',query:{'new':text,'tid':id}})
    }
  },
  mounted() {
    this.get_biaoti()
  }
}
</script>

<style scoped>

</style>
